{% extends 'base.html' %}

{% block title %}Local issue gathering{% endblock %}

{% block content %}

<div class="span-5 task">


{% if submitted %}
 <h3>Thank you for adding an issue!</h3>
 <p>Please carry on adding more issues for as long as you have the energy. <a href="{% url tasks %}">No thanks, I've finished</a></p>
</p>

{% else %}
 <h3>
  Research local issues
 </h3>
{% endif %}

{% if form %}
<p>Please help research local issues that might help distinguish between candidates.  If you can't think of anything controversial, something is better than nothing! For more information on how to do this task, and a chance to discuss it with other people, <a href="http://democracyclub.activeboard.com/index.spark?aBID=134686&subForumID=498468&p=2">visit the forum</a> we've set up for this purpose. </p>
    <form action="" method="post" id="signup">
         <div class="fieldWrapper">
            {{ form.constituency.errors }}
            {{ form.question.errors }}
            <label for="id_question">
                1. Enter a controversial local question 
                to ask candidates 
                about.
            </label>
            {{ form.question }}
            <p class="helptext">
                e.g. Should the bypass round Lancaster be built?
                <br>
                Keep it <strong>genuinely local</strong>
                    to {{ constituency.name }} constituency.
                We'll ask candidates national questions anyway, separately.
                Make sure it <strong>divides the candidates</strong>. 
            </p>
        </div>
        <div class="fieldWrapper">
            {{ form.reference_url.errors }}
            <label for="id_question">
                2. If possible, please provide a link that shows that this is a real local issue
        </label>
            {{ form.reference_url }}
            <p class="helptext">
                e.g. http://www.cares.ukhome.net/
            </p>
        </div>
        <input type="submit" value="Save" />
    </form>
{% endif %}
</div>

<div class="span-3 last">
{% if issues %}
 <h3>Existing issues in {{ constituency.name }}</h3>
 <ul>
 {% for issue in issues %}
  <li><a href="{{ issue.reference_url }}" target="_blank">{{ issue.question }}</a></li>
 {% endfor %}
 </ul>
{% endif %}
</div>

{% endblock %}
